import { FormControl,FormGroup} from "@angular/forms";
/**
 * 这个ts是负责表单校验的   
 * 可以手动新增校验规则
 * By guopeng
 */


/**
 * [再次输入密码验证]
 * @param  {[type]} info:FormGroup [description]
 * @return {[type]}                [description]
 */
export function passwordValidator(info:FormGroup):any{
	let password : FormControl = info.get('password') as FormControl;
	let pConfirm : FormControl = info.get('passwordConfirm') as FormControl;
	let valid : boolean = password.value === pConfirm.value;
	return valid ? null : { password : true };
}


